<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGovernmentBasesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('government_base', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_users中的id
			$table->integer('uid');
			//varchar 255 单位名称
			$table->string('company_name');
			//varchar 50 组织机构代码
			$table->string('group_code',50);
			//varchar 20 联系人
			$table->string('contact_person',20);
			//varchar 30 联系人电话，手机号或固话均可
			$table->string('contact_number',30);
			//varchar 20 注册地址中的省代码
			$table->string('province',20);
			//varchar 20 注册地址中的市代码
			$table->string('city',20);
			//varchar 20 注册地址中的区代码
			$table->string('area',20);
			//varchar 255 详细地址
			$table->string('address');
			//varchar 20 邮政编码，前端为选填项
			$table->string('zcode',20);
			//varchar 50 传真号，前端为选填项
			$table->string('fax',50);
			//varchar 50 联系人邮箱
			$table->string('email',50);
			//text 简介
			$table->text('induction');
			//varchar 255 营业执照副本文件名
			$table->string('regist_copy');

			$table->string('logo');
			//text 公司简介
			$table->text('description');

			$table->softDeletes();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('government_bases');
	}

}
